package org.answer.utils;

import org.apache.log4j.Logger;

import java.text.SimpleDateFormat;
import java.util.Date;

public class ErrorMailUtils {
    private static final Logger logger = Logger.getLogger("系统异常日志");

    public static Logger getLogger() {
        return logger;
    }

    public static void looger(Exception e) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String currentTime = dateFormat.format(new Date());
        logger.error("异常发生时间：" + currentTime, e);
    }
}